home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / batch / library / batutl2 / answer.doc < prev    next >
Text File  |  1986-09-08  |  3KB  |  79 lines

  1. ¢4 L
  2.  
  3.                                       ANSWER
  4.                                      VER. 1.0
  5.  
  6.                                 By: FRANK SCHWEIGER
  7.                                       2/1/86
  8.  
  9.  
  10.               Have you ever wanted to ask a question and get an answer that
  11.               you could use in a batch file?  This program is the ANSWER.
  12.               I had need to ask for a directory and program name in a batch
  13.               file I was writing, and discovered that there was absolutly
  14.               no way to do it.  I wrote ANSWER to fill that need.
  15.  
  16.               The syntax for using ANSWER is as follows:
  17.  
  18.               ANSWER [optional prompt]
  19.  
  20.               ANSWER will display the optional prompt, and then accept
  21.               input from the keyboard.  It will place the input in your
  22.               CURRENT ENVIRONMENT AREA in a field named ANSWER.
  23.  
  24.               If "ANSI.SYS" has been loaded, the optional prompt may
  25.               contain any valid ANSI sequences to position the cursor,
  26.               change color, etc.
  27.  
  28.               The user must have previously displayed some indication that
  29.               keyboard input is expected or include the optional prompt to
  30.               do so.  If the optional prompt is not present ANSWER will NOT
  31.               DISPLAY ANYTHING that would inform the operator that input is
  32.               expected.
  33.  
  34.               Parameters in the ENVIRONMENT AREA may be accessed similarly
  35.               to command line parameters.  See the following examples for
  36.               clarification:
  37.  
  38.               Example 1:
  39.               ANSWER Enter the full filespec for the source file:
  40.               COPY %ANSWER% junk.dst
  41.  
  42.               Example 2:
  43.               ANSWER Enter the drive ("d:") the source file is on:
  44.               SET DRIVE=%ANSWER%
  45.               ANSWER Enter the path ("path\") for the source file:
  46.               SET COPYPATH=%ANSWER%
  47.               ANSWER Enter the Source filename:
  48.               COPY %DRIVE%%COPYPATH%%ANSWER% junk.dst
  49.  
  50.               The second example uses 3 parameters in the ENVIRONMENT AREA.
  51.               If you have not expanded your ENVIRONMENT AREA, you may run
  52.               out of space.
  53.  
  54.               ANSWER sets a return code which can be examined by the
  55.               ERRORLEVEL option of the IF statement.  ERRORLEVEL will be 0
  56.               if ANSWER was sucessful, or 1 if there was insufficient room
  57.               or the ENVIRONMENT AREA was corrupted.
  58.  
  59.  
  60.               This program is provided "as is" without warranty of any
  61.               kind, either expressed or implied, including, but not limited
  62.               to the implied warranties of merchantability or fitness for a
  63.               particular purpose.  The entire risk as to the results and
  64.               performance of the program is assumed by the user.  Should
  65.               the program prove defective, the user assumes the entire cost
  66.               of all necessary servicing, repair or correction.
  67.  
  68.               This program is donated to the PUBLIC DOMAIN, and may be
  69.               freely copied without any restrictions.
  70.  
  71.  
  72.                    Comments or suggestions may be forwarded to:
  73.  
  74.               Frank Schweiger 10083 Heytesbury Ln.  Sandy, Ut. 84092
  75.  
  76.               I can also be reached on the STATION ZEBRA Bulletin Board in
  77.               Salt Lake City, Utah at (801) 561-4652.
  78. ¢0 L
  79.